package csdn.xiancheng.li06;

import com.briup.md01.string;

public class MyPrint {
    //同步方法
    public synchronized void pr(){
        System.out.println("好");
        System.out.println("好");
        System.out.println("学");
        System.out.println("习");
        System.out.println("\n");
    }

    //静态同步方法
    public static synchronized void pr2(){
        System.out.println("天");
        System.out.println("天");
        System.out.println("向");
        System.out.println("上");
        System.out.println("\n");
    }

    
}
